<!doctype html>
<html lang="zh-hans">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<!-- css -->
<link rel="stylesheet" href='<?=base_url().'resource/lib/bootstrap/css/bootstrap.min.css'?>'>
<?php if ($showdebug==false): ?>
<link rel="stylesheet" href='<?=base_url().'resource/css/debug.css'?>'>
<?php endif; ?>
<!-- js -->
<script src='<?=base_url().'resource/lib/bootstrap/jquery-2.1.1.min.js'?>'></script>
<script src='<?=base_url().'resource/lib/bootstrap/js/bootstrap.min.js'?>'></script>

<title>首页</title>

<script>
/* 缓存 */
window.onload = function() { 
// 	var openId = document.getElementById("openId"); 
// 	var uid = document.getElementById("uid");
// 	var name = document.getElementById("name"); 
// 	var state = document.getElementById("state"); 
// 	var flag = document.getElementById("flag");

	var openId = sessionStorage.getItem("openId"); 
	var uid = sessionStorage.getItem("uid"); 
	var name = sessionStorage.getItem("name"); 
	var state = sessionStorage.getItem("state"); 
	var flag = sessionStorage.getItem("flag"); 

	$('#openId').val(openId);
	$('#uid').val(uid);
	$('#name').val(name);
	$('#state').val(state);
	$('#flag').val(flag);

}

function tijiao(flag){
	$('#flag').val(flag);
// 	alert('flag='+$('#flag').val());
// 	if(flag>0)
    document.form1.submit();
}

</script> 
 
</head>
<body>
<div class="container">
<div class="row">
<header id="myheader">
<p><?php echo isset($name)?$name:'';?>您好!欢迎加入西部挖掘机经纪人联盟</p>
</header>

<section id="hide_form" class="_hide">
<form id="form1" name="form1" action="<?=base_url().'index.php/main_control/entrance_do'?>" method="post">
<input type="text"  name="openId" id="openId" placeholder="openId"  value="<?php echo isset($openId)?$openId:'';?>">
<input type="text"  name="name" id="name" placeholder="name" value="<?php echo isset($name)?$name:'';?>">
<input id="uid"  name="uid" placeholder="uid" type="text" class="form-control"  value="<?php echo isset($uid)?$uid:0;?>" >
<input id="state"  name="state" placeholder="state" type="text" class="form-control"  value="<?php echo isset($state)?$state:-1;?>" >
<input id="flag"  name="flag" placeholder="flag" type="text" class="form-control"  value="<?php echo isset($flag)?$flag:-1;?>" >
</form>
</section>

<div class="jumbotron">
	<h3><?php echo isset($msg)?$msg:'';?></h3>
</div>

<section id="daohang">
<div class="col-xs-3"></div>
<div class="col-xs-3"><a class="btn btn-primary btn-lg" href="#" role="button" onClick="tijiao(3)">回到首页</a></p></div>
<div class="col-xs-3"><a class="btn btn-primary btn-lg" href="#" role="button" onClick="tijiao(2)">继续推荐</a></p></div>
<div class="col-xs-3"></div>
</section>





<?php 
$this->load->helper('url');
$this->load->view('_footer');
?>

<section id="footer">
<div id="_buttom_menu" class="navbar-fixed-bottom">
<div class="col-xs-3"><button type="button" class="btn btn-info" onClick="tijiao(3)">回到首页</button></div>
<div class="col-xs-3"><button type="button" class="btn btn-info" onClick="tijiao(2)">推荐客户</button></div>
<div class="col-xs-3">
<div class="btn-group dropup">
<button type="button" class="btn btn-info dropdown-toggle" 
data-toggle="dropdown">
个人中心<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#" onClick="tijiao(4)">我的信息</a></li>
<li><a href="#" onClick="tijiao(5)">我的客户</a></li>
</ul>
</div>    
</div>
<div class="col-xs-3"><button type="button" class="btn btn-info">。。。</button></div>
</div>
</section>



</div>
</div>
</body>
</html>